﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace EBA.IoC
{
    ///<summary>
    ///IoC容器配置节点
    /// </summary>
    /// <example>
    ///<eba>
    ///  <ioc>
    ///    <types>
    ///      <add name=""></type>
    ///    </types>
    ///  </ioc>
    ///</eba>
    /// </example>
    public class ContainerConfigurationSection : ConfigurationSection
    {
        [ConfigurationProperty("type", IsRequired = false,DefaultValue="")]
        public string Type
        {
            get { return (string)this["type"]; }
            set { this["type"] = value; }
        }


        [ConfigurationProperty("types",IsRequired=false)]
        public TypeConfigurationElementCollection Types
        {
            get
            {
                return (TypeConfigurationElementCollection)this["types"];
            }
            set
            {
                this["types"] = (object)value;
            }
        }

        [ConfigurationProperty("assemblies", IsRequired = false)]
        public AssemblyConfigurationElementCollection Assemblies
        {
            get
            {
                return (AssemblyConfigurationElementCollection)this["assemblies"];
            }
            set
            {
                this["assemblies"] = (object)value;
            }
        }
    }
}
